package top.lwaiting.sqlSession.impl;

import top.lwaiting.pojo.Configuration;
import top.lwaiting.sqlSession.SqlSession;
import top.lwaiting.sqlSession.SqlSessionFactory;

/**
 * @author YANG
 * @version V1.0
 * @date 2024/1/18 14:47
 * @see DefaultSqlSessionFactory
 **/
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
